let ul = document.querySelector('.list');
console.log(ul)
let lis = Array.from(ul.querySelectorAll('li'));
lis.forEach((item, index) => {
    item.onclick = () => {
        for (var i = 0; i < item.clientHeight; i++) {
            item[i].classList.remove('active');
        }
        this.classList.add('active')
    }
})